<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags/form"%>
<%request.setAttribute("pageTitle", "人员管理"); %>
<%@include file="../include/header.jsp" %>
<script type="text/javascript" src="/js/user/workspace.js"></script>
<div style="width:98%;" class="search-header">
<s:form id="listForm" action="/users" method="get" modelAttribute="user">
	<%@ include file="../include/_page_form.jsp" %>
	<span class="search-item"><label>姓名</label><s:input path="fullname" placeholder="姓名/拼音/拼音首字母" size="20"/> </span>
	<span class="search-item"><label>域账号</label><s:input path="logname" placeholder="域账号进行前匹配" size="20"/></span>
	<span class="search-item"><label>状态</label><s:select path="status" items="${status }" itemLabel="label" itemValue="value"></s:select></span>
	<span class="search-item"><label>标签</label><%@ include file="../include/_select_tags.jsp" %></span>
	<span class="search-btn"><input type="submit" value="搜索" /></span>
</s:form>
</div>
<table style="width:98%">
	<tr class="caption"><td>姓名</td><td>域账号</td><td>状态</td><td>标签</td><td><a href="/users/add">新增人员</a></td></tr>
	<c:forEach items="${users.content}" var="user" varStatus="count">
	<tr <c:if test="${count.index % 2 ==0 }">class="odd"</c:if> dataid="${user.userId }" >
		<td><c:out value="${user.fullname }"/> </td>
		<td><c:out value="${user. logname}"/> </td>
		<td class="js-user-status" >
			<c:forEach items="${status}" var="s"><c:if test="${user.status==s.value}">${s.label} </c:if></c:forEach>
		</td>
		<td class="js-tagnames" >
		</td>
		<td>
			<select class="js-oper" dataid="${user.userId }" username='<c:out value="${user.fullname }"/>'>
				<option value="">请选择</option>
				<option value="1">修改</option>
				<option value="2">置为离职</option>
			</select>
		</td>
	</tr>
	</c:forEach>
</table>
<%@ include file="../include/_page_footer.jsp" %>
<%@ include file="../include/footer.jsp" %>